package com.cskaoyan.demo;

import com.cskaoyan.utils.DruidUtils;
import org.apache.commons.dbutils.QueryRunner;

import java.sql.Connection;
import java.sql.SQLException;

// 增删改的例子
public class QueryRunnerDemo7 {

    public static void main(String[] args) throws SQLException {

        QueryRunner queryRunner = new QueryRunner();
        Connection connection = DruidUtils.getConnection();


        int affectedRows = queryRunner.update(connection,"insert into account values (null,?,?)","张飞",250);

        System.out.println(affectedRows);

        connection.close();
    }
}
